Microsoft 365 – Get password age for all users

Connect-MsolService
Get-MsolUser -All  | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}

Leave a Reply